# Makefile2.6
ifneq ($(KERNELRELEASE),)
#kbuild syntax. dependency relationshsip of files and target modules are listed here.
mymodule-objs := ecram_drv.o
obj-m := ecram_drv.o 
else
PWD := $(shell pwd)
KVER ?= $(shell uname -r)
#KDIR := /lib/modules/$(KVER)/build
#KDIR := /usr/src/kernels/3.10.84-22.fc21.loongson.10.mips64el //

KDIR := /lib/modules/$(KVER)/build

all:
	$(MAKE) -C $(KDIR) M=$(PWD)
#	gcc -c ecramdrvtest.c 
	gcc ecramdrvtest.c -o ecramdrvtest
	
clean:
	rm -rf .*.cmd *.o *.mod.c *.ko .tmp_versions modules.order  Module.symvers ecramdrvtest
endif
